<!doctype html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<script>
selection_test(
    [
        '<div contenteditable>',
            '<div>|abc</div>',
            '<div>def</div>',
        '</div>',
    ],
    'justifyCenter',
    [
        '<div contenteditable>',
            '<div style="text-align: center;">|abc</div>',
            '<div>def</div>',
        '</div>',
    ], 'left to center');
selection_test(
    [
        '<div contenteditable>',
            '<div style="text-align: right;">|abc</div>',
            '<div>def</div>',
        '</div>',
    ],
    'justifyCenter',
    [
        '<div contenteditable>',
            '<div style="text-align: center;">|abc</div>',
            '<div>def</div>',
        '</div>',
    ], 'right to center');
</script>
